package com.framework.design;

public class SenderFactory {
	
	public Sender produce(String type) {
		Sender sender = null ;
		if ("mail".equals(type)) {
			sender = new MailSender();
		}
		else if ("Ems".equals(type)) {
			sender = new EmsSender();
		}
		else {
			System.out.println("没有该类型");
		}
		
		return sender;
	}
}
